Skip to content

fix(quota-plane): publish over-limit Turso windows and preserve dated card metrics (#6227) - #6229

Merged
developing-today[bot] merged 1 commit into
mainfrom
queue/10544-6227-turso-metrics
Nov 5, 2026
Merged

developing-today[bot] merged 1 commit into
mainfrom
queue/10544-6227-turso-metrics

Conversation

@developing-today

@developing-today developing-today Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6227 — task 10544 (queue repo-health-code-pilot, lane code-t).

Root cause

The live Turso row (source opencode-quota) carried only databases / rows-written / sync because every layer between the Turso API and the SaaS card dropped or erased the over-limit windows:

  • The opencode turso provider dropped any window whose percent-of-limit exceeded 100 (companion PR in developing-today-forks/opencode).
  • The aggregator's mappers did the same, and overlayTursoUsage replaced the whole card metric set with only the windows a fresh entry carried — so a partial fresh row silently erased the last dated storage / rows-read values.

On 2026-11-05 the org was at ~147% of the 5 GB storage limit (7.358009 GB) and ~165% of the monthly rows-read limit (821,437,321) — exactly the state that vanished.

Changes (this PR, pm-stack/aggregator/)

Companion PR (the set, per the cross-repo rule)

developing-today-forks/opencode: branch queue/10544-6227-turso-overlimit — the turso provider's push gate drops only non-finite/negative ratios, so the subcommand publishes storage / rows-read windows above 100% in the first place.

Verification

  • Laptop (worktree): bun test test/quota-gather-map.test.ts test/quota-current.test.ts test/phase3-boundaries.test.ts — 121 pass, 0 fail.
  • Full aggregator suite on this branch: same failure set as clean main (24 pre-existing failures in unrelated board/source-gate suites, verified by running the suite stashed on clean main: 1436 pass / 24 fail / 2 errors).
  • No credentials in source/logs; no plan, billing, or Atlas data changes.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@developing-today
developing-today Bot requested review from a team and dezren39 as code owners November 5, 2026 13:38
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e288f1f-078c-4adf-85d8-6ba409212239

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today
developing-today Bot merged commit 22d8ef5 into main Nov 5, 2026
1 check passed
@developing-today
developing-today Bot deleted the queue/10544-6227-turso-metrics branch November 5, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(quota-plane): preserve fresh Turso storage and rows-read measurements

0 participants